/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chelydra.sharelydra.server.ejb;

import java.util.Collection;
import javax.ejb.Local;

/**
 *
 * @author scallion
 */
@Local
public interface SLSManager {

	public SLSUser register(SLSUser user) throws Exception;

	public SLSUser connect(SLSUser user, String ip, Integer port);
	public SLSUser disconnect(SLSUser user);

	public SLSUser retrieveUserWithID(Long id);
	public SLSUser retrieveUserWithLogin(String login);
	public SLSUser retrieveUserWithLoginAndPassword(String login, String password);

	public void sendFriendshipProposal(SLSUser from, SLSUser to);
	public SLSUser acceptFriendshipProposal(SLSUser accepting, SLSUser proposing);
	public void declineFriendshipProposal(SLSUser declining, SLSUser proposing);
	public SLSUser removeFriendship(SLSUser removing, SLSUser removed);

	public Collection<SLSNotification> retrieveNotificationsForUser(SLSUser u);
	public void deleteNotificationsForUser(SLSUser u);
	
	public SLSUser modifyProfile(SLSUser user);

	public Collection<SLSUser> searchFriendsForKeywords(Collection<String> keywords);

	public void notifyUsersForFile(SLSUser from, String file, Collection<String> friends);
    
}
